/**
 * filename: HelloWorld.java
 * create time: 2009-4-10 下午10:36:00
 */
package org.lstc.say.homework.action;

import com.opensymphony.xwork2.ActionContext;

/**
 * @author sai
 *
 */
public class HelloWorld {
	private String name;

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}
	
	public String execute() {
		try{
			Integer.parseInt(name);
		}catch(Exception e) {
			return "error";
		}
		ActionContext.getContext().getSession().put("user", name);
		System.out.println("name:" + name);
		return "success";
	}
}
